<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>{$meta_title}</title>
  
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" type="image/png" href="">
  <link rel="apple-touch-icon-precomposed" href="">
  <meta name="apple-mobile-web-app-title" content="{$meta_title}" />
  <link rel="stylesheet" href="__ROOT__/Application/Home/View/default/assets/css/amazeui.min.css"/>
  <link rel="stylesheet" href="__ROOT__/Application/Home/View/default/assets/css/admin.css">
 <script type="text/javascript" src="__PUBLIC__/libs/dingding/javascripts/zepto.min.js"></script>
  <script type="text/javascript" src="https://g.alicdn.com/ilw/ding/0.8.9/scripts/dingtalk.js"></script>
</head>
<body>

<div class="am-cf admin-main">
  

<!-- content start -->
<div class="admin-content">
  <div class="admin-content-body">
     <div style="height:10px;"></div>
     <div class="am-g">
         <div class="am-u-sm-3 am-u-md-4 am-u-end" >
          <div class="am-form-group">
            <select name="keywords" id="level_select" style="height: 33px; width: 150%; border: 1px solid #ccc;">
            <option value="0" >请选择</option>
            	<volist name="customer_level" id="vo" >
            		<option value="{$vo.fieldvalue}">{$vo.title}</option>
	            </volist>
              
            </select>
          </div>
        </div>
        
        <div class="am-u-sm-8 am-u-md-4">
          <div class="am-input-group am-input-group-sm">
            <input type="text" class="am-form-field" id="so_customer" placeholder="请输入客户名/编号/手机号">
          <span class="am-input-group-btn">
            <button class="am-btn am-btn-default" type="button" id="search">搜索</button>
          </span>
          </div>
        </div>
     </div>
             
      <div class="am-g">
      	<div class="am-u-sm-12">
          <table class="am-table am-table-striped am-table-hover table-main">
            <thead>
            <tr>
             
            		<th >级别</th>
					<th >客户名</th>
					<th >来源</th>
					<th >操作</th>
            </tr>
            </thead>
            <tbody>
            <volist name="data_list" id="vo" key="k">
				<tr >

					<td >{$vo.level}</td>
					<td >{$vo.customer_name}</td>
					<td >{$vo.source}</td>
					
					<td>
						<a href="/Wap/Customer/customerinfo/id/{$vo.id}"><span class="am-badge am-badge-success">详细</span></a>
						
					</td>
				</tr>
				</volist>
                        
            
            </tbody>
          </table>

          <div class="pagin"><ul class="paginList">{$page}</ul></div>
          
        </div>
      </div>


  </div>
<div style="height:80px;"></div> 
  
</div>
<!-- content end -->

</div>

<script type="text/javascript" >

//搜索服务器
$('#search').click(function(){
	var keyword=$('#so_customer').val();
	var keywords=$('#level_select option:selected') .val();
	
	if(keywords && keyword ){
		window.location.href='/Wap/Customer/index/keyword/'+keyword+'/keywords/'+keywords;
	}else if(keywords  && !keyword ){
		window.location.href='/Wap/Customer/index/keywords/'+keywords;
	}else{
		window.location.href='/Wap/Customer/index/keyword/'+keyword;
	}
});


 dd.ready(function() {
		//下拉刷新
		dd.ui.pullToRefresh.enable({
		    onSuccess: function() {
		    	window.location.reload();
		    	dd.ui.pullToRefresh.stop();
		    },
		    onFail: function() {
		    	
		    }
		});
			
			//右侧
			dd.biz.navigation.setMenu({
	        backgroundColor : "#ADD8E6",
	        textColor : "#ADD8E611",
	        items : [
	            {
	                "id":"1",//字符串
	            "iconId":"",//字符串，图标命名
	              "text":"我的客户"
	            },
	            {
	                "id":"2",
	            "iconId":"",
	              "text":"新增"
	            }
	        ],
	        onSuccess: function(data) {
	       
		        if(data.id==1){
		        	window.location.href='/Wap/Customer/my';
		        }
		        if(data.id==2){
		        	window.location.href='/Wap/Customer/add';
		        }
	        },
	        onFail: function(err) {
	        }
	    });
			

	}); 	
	 

 
</script>
<!-- footnav start --> 
<style>
.footnav{ position: fixed;  bottom: 0;    width: 100% ; background: #fff; z-index:999999}
.footnav ul{ padding:5px 0; border-top:1px solid #ccc}
.footnav ul li{ width:20%; float:left;list-style-type: none;}
.footnav ul li a{ display:block; text-align:center; font-size:12px;    color: #767171;}
.footnav ul li a span{ font-size:24px;line-height: 20px;}
.active a {color:#0e90d2 !important;}

</style>
<div class=" footnav">
    <ul>
    <li > <a  href="/Wap/Index/shouye" ><span class="am-icon-home"></span>首页 </a> </li>
     <li ><a href="/Wap/Task/mytask"><span class="am-icon-file-text"></span>任务</a></li>
      <li ><a href="/Wap/Server/index"><span class="am-icon-recycle"></span> 服务器</a></li>
      <li class="active"><a href="/Wap/Customer/index"><span class="am-icon-user-md"></span>客户</a></li> 
      <li ><a href="/Wap/Project/index"><span class="am-icon-briefcase"></span>项目</a></li>
    </ul>
    
</div>
<!-- footnav end -->
<script src="__ROOT__/Application/Home/View/default/assets/js/jquery.min.js"></script>

<script src="__ROOT__/Application/Home/View/default/assets/js/amazeui.min.js"></script>
<script src="__ROOT__/Application/Home/View/default/assets/js/app.js"></script>
</body>
</html>
